//
//  MYShopDetailsBottonView.swift
//  MuYing
//
//  Created by tbb on 2019/7/29.
//  Copyright © 2019 TBB. All rights reserved.
//

import UIKit

class MYShopDetailsBottonView: UIView {
    @objc @IBOutlet weak var likeBtn: UIButton!
    @IBOutlet weak var btnBgView: UIView!
    
    @objc @IBOutlet weak var addCar: UIButton!
    
    @objc @IBOutlet weak var buyBtn: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib();
        self.btnBgView.layer.cornerRadius = 16;
        self.btnBgView.clipsToBounds = true;
        self.likeBtn.setImage(UIImage(named: "common_like_icon"), for: .normal);
        self.likeBtn.setImage(UIImage(named: "common_like_s_icon"), for: .selected);
        self.likeBtn.addTarget(self, action: #selector(likeAction(_:)), for: .touchUpInside)
        
        self.addCar.setTitle(kYQLSSwift("加入购物车"), for: .normal)
        self.buyBtn.setTitle(kYQLSSwift("立即购买"), for: .normal)
    }
    
    @objc public func likeAction(_ sender:UIButton) {
        sender.isSelected = !sender.isSelected;
    }
    
}
